#!/usr/bin/make -f

DEB_BUILD_MAINT_OPTIONS = hardening=+bindnow
DPKG_EXPORT_BUILDFLAGS = 1
include /usr/share/dpkg/buildflags.mk

%:
	dh $@ --with autoreconf,xsf

# create m4 directory before running autoreconf
override_dh_autoreconf:
	mkdir -p m4
	dh_autoreconf

# remove m4 directory after autoreconf cleanup
override_dh_autoreconf_clean:
	dh_autoreconf_clean
	rm -rf m4

override_dh_auto_configure:
	dh_auto_configure -- --libdir=/usr/lib $(shell dpkg-buildflags --export=configure)

# create debug package
override_dh_strip:
	dh_strip --dbg-package=xserver-xorg-video-omap-dbg

# debug package links to docs from main package
override_dh_installdocs:
	dh_installdocs --link-doc=xserver-xorg-video-omap

# use appropriate warning level for a plugin
override_dh_shlibdeps:
	dh_shlibdeps -- --warnings=6
